Conversation
Masking is now performed on accessing data in the datastore
pytest_cases is not compatible with pytest 8 :/
Tests now pass
|
I've made some changes, can you check it works as expected? You can set the mask with: |
Replace mutation of stored data with numpy masked array Better way to set null mask?
|
Have fixed the problems you stated I think - using a masked array instead of mutation and now generates a null mask in a better way (?) Moat of the time, the masks I used are quite straightforward, for example (from docs): To remove data points in dic_map where max_shear is above 0.8, use:
To remove data points in dic_map where e11 is above 1 or less than -1, use:
To remove data points in dic_map where corrVal is less than 0.4, use:
|
|
Also - there is an inconsistency in function naming - |
|
I did call it |
|
As far as I'm aware, everything still seems to works as expected with a masked array. It does incur an overhead (but much smaller by a factor 1000 than the previous method). Do we need to change the logic to not use masked arrays for data that isn't masked? Currently a masked array is always generated. |
|
A masked array is only returned when a mask is provided. If unset, the normal map data is passed through as before. |
Instead of an arbitrary string, use 'None' to disable masking.
Masking is now performed on accessing data in the datastore.
Removed the preview function in
set_masksince it is now extraneous as the original data is not being overwritten.We should consider moving cropping and masking from
hrdicintobase